const pathlib = require("path");
const Webpack = require("webpack");
module.exports = {
	mode:"development",
	//mode:"production",
    entry: __dirname +"/js/基础配置/index",
    output:{
        path:__dirname +"/dest/",
        filename:"bundle.js",
    },
    plugins:[
    	new Webpack.HotModuleReplacementPlugin()
    ],
    devServer:{
    	disableHostCheck:	true,
    	contentBase:		__dirname+"/static",//会把bundle.js加载到根下
    	port:				8090,
    	hot:				true,
    	inline:				true,
    	//一般配置在有前端路由上
    	historyApiFallback: true  //所有找不到的文件或者访问根或者访问/asdas等等都访问index.html
    },
   module:{
   	rules:[ 
		{
			test:/\.css/,
			use:"css-loader"
		}
   	]
   }
}